<style scoped>

</style>
<template>
  <el-tabs v-model="tab" style="width: 100%;height: 100%;" >
    <el-tab-pane label="详情" name="info" :lazy="true">
      <model_info :__iframe="{path:'/model/edit', param:{id:id,is_info:true}}"></model_info>
    </el-tab-pane>
    <el-tab-pane label="字段" name="field" :lazy="true">
      <model_field ref="model_field" :__iframe="{path:'/model_field/index', param:{model_id:id}}"></model_field>
    </el-tab-pane>
    <el-tab-pane label="检索字段" name="field_where" :lazy="true">
      <model_field_where ref="model_field_where" :__iframe="{path:'/model_field_where/index', param:{model_id:id}}"></model_field_where>
    </el-tab-pane>
  </el-tabs>
</template>
<script>
import model_info from './edit.vue'
import model_field from '../model_field/index.vue'
import model_field_where from '../model_field_where/index.vue'
export default {
  props: ['__iframe'],
  components:{ model_info, model_field, model_field_where },
  data(){
    return {
      tab: this.$get('tab', 'info'),
      id: this.$get('id'),
    }
  },
  methods: {
    model_field_list(){
      this.$refs['model_field'].$refs.list_url.list();
    },
    model_field_where_list(){
      this.$refs['model_field_where'].$refs.list_url.list();
    },
  },
  mounted() {
    let app = this;
    if (!this.__iframe) window['app'] = this;
  }
}
</script>
